Component({
	properties: {
		// 这里定义了innerText属性，属性值可以在组件使用时指定
		innerText: {
			type: String,
			value: 'default value',
		}
	},
	data: {
		// 这里是一些组件内部数据
		someData: {},
		feedId: '', //直播 feedId
		finderUserName: 'sphxF8lPV1kQgIP',
	},
	lifetimes: {
		attached: function() {
			this.customMethod()
		},
	},
	methods: {
		toViewClick() {
			wx.openChannelsUserProfile({
				finderUserName: this.data.finderUserName,
				feedId: this.data.feedId,
				success: res => {
					console.log(res)
				},
				fail: res => {
					console.log(res)
				}
			});
		},
		// 这里是一个自定义方法
		customMethod: function() {
			var that = this
			wx.getChannelsLiveInfo({
				finderUserName: 'sphxF8lPV1kQgIP',
				success: function(res) {
					// console.log('成功', res);
					that.setData({
						feedId: res.feedId
					})
				},
				fail: function(res) {
					console.log('认证失败', res);
				}
			});
		}
	}
})